package com.flitsneak.designpatterns.creationalpatterns.factory.factorymethod;


import com.flitsneak.designpatterns.creationalpatterns.factory.factorymethod.americanbreakfast.Hamburger;
import com.flitsneak.designpatterns.creationalpatterns.factory.factorymethod.breakfastshop.AmericanBreakfastShop;
import com.flitsneak.designpatterns.creationalpatterns.factory.factorymethod.breakfastshop.TraditionalBreakfastShop;
import com.flitsneak.designpatterns.creationalpatterns.factory.factorymethod.traditionalbreakfast.TeaEgg;

/**
 * Author: flitsneak
 * Date: 2022/5/31 17:12
 * Description:
 */
public class FeiFei {
    public static void main(String[] args) {
        TraditionalBreakfastShop traditionalBreakfastShop = new TraditionalBreakfastShop();
        Breakfast teaEgg = traditionalBreakfastShop.makeBreakfast(TeaEgg.class);
        System.out.println("飞飞买的早餐是：" + teaEgg.getName());
        System.out.println("飞飞花了：" + teaEgg.getMoney());

        AmericanBreakfastShop americanBreakfastShop = new AmericanBreakfastShop();
        Breakfast hamburger = americanBreakfastShop.makeBreakfast(Hamburger.class);
        System.out.println("飞飞买的早餐是：" + hamburger.getName());
        System.out.println("飞飞花了：" + hamburger.getMoney());

    }
}
